1. Field of the Invention
The present invention relates generally to reducing the file size of a computer generated document file, and more particularly to reducing the file size of a document file containing content data and template data.
2. Background of the Invention
The use of templates is common practice for the generation of a document on a computer. Documents, like text documents, graphics documents, presentation documents or HTML-documents, contain user defined content data or dynamic data as well as template data from the template used. The combination of the content data with the template data forms the finished, formatted document, which can be used for printout, presentation or a web page.
FIG. 1A illustrates schematically a document file 100 including content data 110A and 110B and template data 111, as for example, formatting data. Document file 100 may be, for example, a user document comprising, as content data, user defined data like text 110A or graphics 110B. Template data 111 is any predetermined data related to the document for determining particular features of the document. Template data 111 may be, for example, formatting data like style templates defining paragraph, object, character, or frame styles.
FIG. 1B shows a different example of a document containing content data and template data. Content data 120 is contained in a foreground or dynamic page 120 and the template data is contained in a background page 125, which may also contain elements, like a logo, an address, an account number or a URL, which are used identically in a plurality of dynamic pages.
Every background page contains an identifier, which allows the identification of the same. The identifier may be a certain name, number, a combination of the two, or any other appropriate means. Every dynamic page, which refers to one or more background pages, contains a reference field comprising the identifier of the employed background page. A combination of the dynamic page with the background page forms, in this example, a finished, formatted document object. An example of a page template is a background page containing formatting information and an empty dynamic page.
When a document is generated usually data objects of a plurality of sources are inputted or copied into the document file. In these cases, not only the content data but also the template data, containing for example formatting information, are copied into the document file thus created. Over time, template data may accumulate in the document file and increase the size of the document file even though the template data are no longer used.
Moreover, in creating a new document, often another document is used as a starting point, which also includes template data. These template data may be not necessary in the new document.